Given Language L= {xϵ {a, b}*|x contains aba as its substring}Fi...
The individual Transition graphs can be made and the difference of transitions can be determined.
View all questions of this test
Given Language L= {xϵ {a, b}*|x contains aba as its substring}Fi...
DFA (Deterministic Finite Automaton) and NFA (Nondeterministic Finite Automaton) are two types of finite automata used to recognize languages. The main difference between DFA and NFA is that DFA has a unique transition for each input symbol, while NFA can have multiple transitions for the same input symbol.
To construct a DFA for the given language L, we need to consider all possible combinations of substrings that contain "aba". We can start by creating a state for each possible prefix of "aba" and then add transitions for the remaining symbols. Let's go through the process step by step:
1. Start State:
- Create a start state q0.
2. Transition for 'a':
- If the current state is q0 and the next symbol is 'a', the DFA transitions to q1.
- If the current state is q1 and the next symbol is 'a', the DFA remains in q1.
- If the current state is q1 and the next symbol is 'b', the DFA transitions to q2.
- If the current state is q2 and the next symbol is 'a', the DFA transitions to q3.
- If the current state is q3 and the next symbol is 'a', the DFA transitions to q3.
3. Transition for 'b':
- If the current state is q0 and the next symbol is 'b', the DFA remains in q0.
- If the current state is q1 and the next symbol is 'b', the DFA remains in q1.
- If the current state is q2 and the next symbol is 'b', the DFA remains in q2.
- If the current state is q3 and the next symbol is 'b', the DFA remains in q3.
4. Final State:
- The DFA reaches a final state q3 if it encounters the substring "aba".
By constructing this DFA, we made a total of 2 transitions: one transition for 'a' and one transition for 'b'. Hence, the answer is option 'A' (2 transitions).
On the other hand, an equivalent NFA for the same language L would have multiple transitions for the same input symbol. In this case, we would have 3 transitions for 'a' (from q0 to q1, from q1 to q1, and from q1 to q2) and 4 transitions for 'b' (from q0 to q0, from q1 to q1, from q2 to q2, and from q3 to q3). Thus, the difference in transitions made in constructing a DFA and an equivalent NFA is 2 - 3 = -1.
To make sure you are not studying endlessly, EduRev has designed Computer Science Engineering (CSE) study material, with Structured Courses, Videos, & Test Series. Plus get personalized analysis, doubt solving and improvement plans to achieve a great score in Computer Science Engineering (CSE).